/*
B
C

 */
#include <iostream>
#include <typeinfo>
using namespace std;
class A{
	public:
		virtual void foo(void){}
};
class B: public A{
	void foo(void){}
};
class C: public A{
	void foo(void){}
};
void func(const A& a){
	if(typeid(a) == typeid(B)){
		cout << "B" << endl;
	}
	else if(typeid(a) == typeid(C)){
		cout << "C" << endl;
	}
}
int  main(void){
	B b;
	C c;
	func(b);
	func(c);
	return 0;
}
